<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>查询详情</title>
<!--[if lt IE 9]>
  <script src="libs/html5shiv.min.js"></script>
  <script src="libs/respond.min.js"></script>
  <![endif]-->
<script src="libs/jquery-1.12.1.min.js"></script>
<script src="libs/jquery.backstretch.min.js"></script>
<link href="libs/bootstrap-3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="libs/bootstrap-3.3.6/js/bootstrap.min.js"></script>
<script src="libs/handlebars.min.js"></script>
<script src="libs/getQueryString.js"></script>
<script src="libs/js.cookie-2.1.0.min.js"></script>
<script src="libs/d3.v3.min.js"></script>
<link href="libs/nv.d3.min.css" rel="stylesheet">
<script src="libs/nv.d3.min.js"></script>
<script src="libs/js.cookie-2.1.0.min.js"></script>
<script src="libs/jquery.backstretch.min.js"></script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="page-header">
				<h2>
					<strong>档案管理</strong>
				</h2>
			</div>

		</div>
	</div>
	<div class="container">
		<div class="row">

			<div class="col-md-12">
				<ul class="nav nav-pills">
					<li><a href="index.html">首页</a></li>
					<li><a href="in.html">档案录入</a></li>
					<li><a href="query.html"> 查询</a></li>
					<li class="active"><a href="tongji.html"> 统计</a></li>
					<li><a href="more.html"> 档案上传</a></li>
					<li><a href="#">用户：<span id="text3"></span></a></li>
					<li><a id="exit"> 退出</a></li>

				</ul>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<hr />
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="col-md-12" id="chart">
				<div class="form-group">
					<label for="date1">起始日期</label> <input type="date" id="date1" />
				</div>
				<div class="form-group">
					<label for="date2">截至日期</label> <input type="date" id="date2" />
				</div>
				<button id="chadate">查询</button>
				<p class="text-center">
					<br />
				<hr />
				<strong>档案统计</strong>
				<svg style="height: 480px; width: 100%"></svg>
				<br />
				</p>
			</div>




		</div>
		<script type="text/javascript">
			$(function() {
				$('#chadate').click(
						function() {

							$.post('chadate.action', {
								date1 : $('#date1').val(),
								date2 : $('#date2').val(),

							}, function(res, status) {
								nv.addGraph(function() {
									var chart = nv.models.pieChart().x(
											function(d) {
												return d.an
											}).y(function(d) {
										return d.cfn
									}).showLabels(true).labelType('percent');
									d3.select("#chart svg").datum(res)
											.transition().duration(350).call(
													chart);
									return chart;
								});

							});
						});

				$('#cx').click(function() {
					$.post('exit.action', {

					}, function(res, status) {
						if ('OK' == res) {
							alert('退出成功');
							window.location.href = 'login.html';
						} else if ('ERR' == res) {
							alert('账号或密码错误');

						}

					});
				});

			});
		</script>
		<script type="text/javascript">
			if (!Cookies.get("user")) {
				window.location.href = 'login.html';
			}
		</script>
		<script type="text/javascript">
			$(function() {
				$.backstretch("456.jpg");
			});
		</script>
</body>
</html>